home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / AAISProlog / Examples / free mem window.p < prev    next >
MacBinary  |  1992-04-07  |  4.5 KB  |  [TEXT/AIFC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Apr 7 15:15:22 1992, modified Tue Apr 7 15:15:22 1992, creator 'AIFC', type ASCII, 4061 bytes "free mem window.p" , at 0x105d 380 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[AIFC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 66 72 65 65 20 6d | 65 6d 20 77 69 6e 64 6f |..free m|em windo|
|00000010| 77 2e 70 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |w.p.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 41 49 46 | 43 01 00 00 00 00 00 00 |.TEXTAIF|C.......|
|00000050| 00 00 00 00 00 0f dd 00 | 00 01 7c a6 07 a5 4a a6 |........|..|...J.|
|00000060| 07 a5 4a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..J.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 03 ec 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 66 72 | 65 65 20 6d 65 6d 20 77 |/*. * fr|ee mem w|
|00000090| 69 6e 64 6f 77 2e 70 0d | 20 2a 0d 20 2a 20 43 6f |indow.p.| *. * Co|
|000000a0| 70 79 72 69 67 68 74 2c | 20 a9 20 31 39 39 32 20 |pyright,| . 1992 |
|000000b0| 41 64 76 61 6e 63 65 64 | 20 41 2e 20 49 2e 20 53 |Advanced| A. I. S|
|000000c0| 79 73 74 65 6d 73 2c 20 | 49 6e 63 2e 0d 20 2a 20 |ystems, |Inc.. * |
|000000d0| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|000000e0| 76 65 64 2e 0d 20 2a 20 | 54 68 69 73 20 66 69 6c |ved.. * |This fil|
|000000f0| 65 20 6d 61 79 20 6e 6f | 74 20 62 65 20 63 6f 70 |e may no|t be cop|
|00000100| 69 65 64 20 6f 72 20 64 | 69 73 74 72 69 62 75 74 |ied or d|istribut|
|00000110| 65 64 20 77 69 74 68 6f | 75 74 20 74 68 65 20 0d |ed witho|ut the .|
|00000120| 20 2a 20 77 72 69 74 74 | 65 6e 20 70 65 72 6d 69 | * writt|en permi|
|00000130| 73 73 69 6f 6e 20 6f 66 | 20 41 64 76 61 6e 63 65 |ssion of| Advance|
|00000140| 64 20 41 2e 20 49 2e 20 | 53 79 73 74 65 6d 73 2c |d A. I. |Systems,|
|00000150| 20 49 6e 63 2e 0d 20 2a | 0d 20 2a 20 09 53 69 6d | Inc.. *|. * .Sim|
|00000160| 70 6c 65 20 65 78 61 6d | 70 6c 65 20 70 72 6f 67 |ple exam|ple prog|
|00000170| 72 61 6d 20 77 68 69 63 | 68 20 64 69 73 70 6c 61 |ram whic|h displa|
|00000180| 79 73 20 74 68 65 20 61 | 6d 6f 75 6e 74 20 6f 66 |ys the a|mount of|
|00000190| 20 66 72 65 65 20 6d 65 | 6d 6f 72 79 0d 20 2a 09 | free me|mory. *.|
|000001a0| 63 75 72 72 65 6e 74 6c | 79 20 61 76 61 69 6c 61 |currentl|y availa|
|000001b0| 62 6c 65 20 77 69 74 68 | 6f 75 74 20 63 6f 6d 70 |ble with|out comp|
|000001c0| 61 63 74 69 6e 67 20 61 | 6e 64 20 72 65 63 6c 61 |acting a|nd recla|
|000001d0| 69 6d 69 6e 67 20 61 6e | 79 20 6f 62 6a 65 63 74 |iming an|y object|
|000001e0| 73 0d 20 2a 09 74 68 61 | 74 20 61 72 65 20 6e 6f |s. *.tha|t are no|
|000001f0| 20 6c 6f 6e 67 65 72 20 | 75 73 65 64 2e 0d 20 2a | longer |used.. *|
|00000200| 09 54 68 69 73 20 65 78 | 61 6d 70 6c 65 20 75 73 |.This ex|ample us|
|00000210| 65 73 20 74 68 65 20 74 | 69 6d 65 64 20 64 65 6c |es the t|imed del|
|00000220| 61 79 65 64 20 68 6f 6f | 6b 73 20 66 65 61 74 75 |ayed hoo|ks featu|
|00000230| 72 65 0d 20 2a 0d 54 68 | 69 73 20 70 75 74 73 20 |re. *.Th|is puts |
|00000240| 75 70 20 61 20 73 6d 61 | 6c 6c 20 77 69 6e 64 6f |up a sma|ll windo|
|00000250| 77 20 74 68 61 74 20 73 | 68 6f 77 73 20 74 68 65 |w that s|hows the|
|00000260| 20 63 75 72 72 65 6e 74 | 0d 61 6d 6f 75 6e 74 20 | current|.amount |
|00000270| 6f 66 20 66 72 65 65 20 | 6d 65 6d 6f 72 79 20 69 |of free |memory i|
|00000280| 6e 20 50 72 6f 6c 6f 67 | 2e 20 20 54 68 69 73 20 |n Prolog|. This |
|00000290| 69 73 20 75 70 64 61 74 | 65 64 0d 65 76 65 72 79 |is updat|ed.every|
|000002a0| 20 66 69 76 65 20 73 65 | 63 6f 6e 64 73 2e 20 20 | five se|conds. |
|000002b0| 49 74 20 75 73 65 73 20 | 74 68 65 20 74 69 6d 65 |It uses |the time|
|000002c0| 64 20 70 72 6f 6c 6f 67 | 20 65 76 65 6e 74 73 0d |d prolog| events.|
|000002d0| 74 6f 20 68 61 76 65 20 | 74 68 69 73 20 75 70 64 |to have |this upd|
|000002e0| 61 74 65 20 64 6f 6e 65 | 20 65 76 65 72 79 20 35 |ate done| every 5|
|000002f0| 20 73 65 63 6f 6e 64 73 | 2e 20 20 54 68 65 20 74 | seconds|. The t|
|00000300| 69 6d 65 64 0d 65 76 65 | 6e 74 20 77 69 6c 6c 20 |imed.eve|nt will |
|00000310| 72 75 6e 20 65 76 65 6e | 20 77 68 65 6e 20 6f 74 |run even| when ot|
|00000320| 68 65 72 20 50 72 6f 6c | 6f 67 20 70 72 6f 67 72 |her Prol|og progr|
|00000330| 61 6d 73 20 61 72 65 0d | 72 75 6e 6e 69 6e 67 2e |ams are.|running.|
|00000340| 20 20 54 69 6d 65 64 20 | 70 72 6f 67 72 61 6d 73 | Timed |programs|
|00000350| 20 63 61 6e 6e 6f 74 20 | 69 6e 74 65 72 72 75 70 | cannot |interrup|
|00000360| 74 20 72 6f 6d 20 74 72 | 61 70 73 2c 0d 6f 72 20 |t rom tr|aps,.or |
|00000370| 43 20 63 6f 64 65 20 6f | 72 20 6f 74 68 65 72 20 |C code o|r other |
|00000380| 70 72 6f 63 65 73 73 65 | 73 3b 20 74 68 65 79 20 |processe|s; they |
|00000390| 63 61 6e 20 74 61 6b 65 | 20 70 6c 61 63 65 0d 61 |can take| place.a|
|000003a0| 74 20 74 68 65 20 73 61 | 6d 65 20 74 69 6d 65 20 |t the sa|me time |
|000003b0| 74 68 61 74 20 74 68 65 | 20 69 6e 74 65 72 72 75 |that the| interru|
|000003c0| 70 74 20 6b 65 79 20 63 | 61 6e 20 74 61 6b 65 0d |pt key c|an take.|
|000003d0| 65 66 66 65 63 74 2e 20 | 20 48 6f 77 65 76 65 72 |effect. | However|
|000003e0| 2c 20 74 69 6d 65 64 20 | 63 6f 64 65 20 77 69 6c |, timed |code wil|
|000003f0| 6c 20 74 61 6b 65 20 70 | 6c 61 63 65 20 64 75 72 |l take p|lace dur|
|00000400| 69 6e 67 0d 6e 6f 5f 61 | 6c 6c 6f 77 5f 64 65 62 |ing.no_a|llow_deb|
|00000410| 75 67 20 63 6f 64 65 20 | 77 68 65 72 65 20 61 73 |ug code |where as|
|00000420| 20 69 6e 74 65 72 72 75 | 70 74 73 20 61 72 65 20 | interru|pts are |
|00000430| 74 75 72 6e 65 64 20 6f | 66 66 20 61 74 0d 74 68 |turned o|ff at.th|
|00000440| 61 74 20 74 69 6d 65 2e | 0d 0d 20 2a 20 54 6f 20 |at time.|.. * To |
|00000450| 73 74 61 72 74 3a 0d 20 | 2a 09 3f 2d 20 73 68 6f |start:. |*.?- sho|
|00000460| 77 5f 66 72 65 65 5f 6d | 65 6d 6f 72 79 2e 0d 20 |w_free_m|emory.. |
|00000470| 2a 20 4e 6f 74 65 3a 20 | 63 6f 6e 73 75 6c 74 69 |* Note: |consulti|
|00000480| 6e 67 20 74 68 69 73 20 | 66 69 6c 65 20 77 69 6c |ng this |file wil|
|00000490| 6c 20 72 75 6e 20 73 68 | 6f 77 5f 66 72 65 65 5f |l run sh|ow_free_|
|000004a0| 6d 65 6d 6f 72 79 2f 30 | 2c 20 73 6f 20 79 6f 75 |memory/0|, so you|
|000004b0| 20 64 6f 20 6e 6f 74 0d | 20 2a 20 6e 65 65 64 20 | do not.| * need |
|000004c0| 74 6f 20 72 75 6e 20 69 | 74 20 65 78 70 6c 69 63 |to run i|t explic|
|000004d0| 69 74 6c 79 20 75 6e 6c | 65 73 73 20 79 6f 75 20 |itly unl|ess you |
|000004e0| 77 69 73 68 20 74 6f 20 | 63 72 65 61 74 65 20 61 |wish to |create a|
|000004f0| 20 73 65 63 6f 6e 64 20 | 66 72 65 65 20 6d 65 6d | second |free mem|
|00000500| 6f 72 79 0d 20 2a 20 77 | 69 6e 64 6f 77 20 6f 72 |ory. * w|indow or|
|00000510| 20 72 65 73 74 61 72 74 | 20 74 68 69 73 20 61 66 | restart| this af|
|00000520| 74 65 72 20 79 6f 75 20 | 68 61 76 65 20 63 6c 6f |ter you |have clo|
|00000530| 73 65 64 20 74 68 65 20 | 66 72 65 65 20 6d 65 6d |sed the |free mem|
|00000540| 6f 72 79 20 77 69 6e 64 | 6f 77 2e 0d 20 2a 0d 20 |ory wind|ow.. *. |
|00000550| 2a 2f 0d 09 0d 73 68 6f | 77 5f 66 72 65 65 5f 6d |*/...sho|w_free_m|
|00000560| 65 6d 6f 72 79 20 3a 2d | 0d 09 63 72 65 61 74 65 |emory :-|..create|
|00000570| 28 66 72 65 65 5f 6d 65 | 6d 6f 72 79 5f 77 69 6e |(free_me|mory_win|
|00000580| 64 6f 77 2c 20 5f 46 72 | 65 65 4d 65 6d 6f 72 79 |dow, _Fr|eeMemory|
|00000590| 57 69 6e 64 6f 77 2c 0d | 09 09 5b 31 30 30 2c 20 |Window,.|..[100, |
|000005a0| 31 30 30 2c 20 31 35 30 | 2c 20 33 30 30 5d 2c 20 |100, 150|, 300], |
|000005b0| 27 46 72 65 65 20 4d 65 | 6d 6f 72 79 27 29 2e 0d |'Free Me|mory')..|
|000005c0| 0d 2f 2a 0d 20 2a 20 54 | 68 69 73 20 69 73 20 61 |./*. * T|his is a|
|000005d0| 20 73 69 6d 70 6c 65 20 | 67 72 61 70 68 69 63 20 | simple |graphic |
|000005e0| 6f 62 6a 65 63 74 20 74 | 79 70 65 20 66 6f 72 20 |object t|ype for |
|000005f0| 64 69 73 70 6c 61 79 69 | 6e 67 20 74 68 65 20 66 |displayi|ng the f|
|00000600| 72 65 65 0d 20 2a 09 6d | 65 6d 6f 72 79 2e 20 20 |ree. *.m|emory. |
|00000610| 57 65 20 63 72 65 61 74 | 65 20 74 68 69 73 20 74 |We creat|e this t|
|00000620| 6f 20 64 65 66 69 6e 65 | 20 61 6e 20 75 70 64 61 |o define| an upda|
|00000630| 74 65 20 65 76 65 6e 74 | 20 66 6f 72 20 69 74 20 |te event| for it |
|00000640| 74 68 61 74 0d 20 2a 09 | 61 75 74 6f 6d 61 74 69 |that. *.|automati|
|00000650| 63 61 6c 6c 79 20 72 65 | 77 72 69 74 65 73 20 69 |cally re|writes i|
|00000660| 74 73 65 6c 66 20 77 68 | 65 6e 20 6e 65 65 64 65 |tself wh|en neede|
|00000670| 64 2e 0d 20 2a 2f 0d 3a | 2d 20 63 72 65 61 74 65 |d.. */.:|- create|
|00000680| 28 67 72 61 70 68 69 63 | 5f 6f 62 6a 65 63 74 5f |(graphic|_object_|
|00000690| 74 79 70 65 2c 20 5f 2c | 20 66 72 65 65 5f 6d 65 |type, _,| free_me|
|000006a0| 6d 6f 72 79 5f 62 6f 78 | 2c 0d 09 09 62 61 73 69 |mory_box|,...basi|
|000006b0| 63 5f 67 72 61 70 68 69 | 63 5f 6f 62 6a 65 63 74 |c_graphi|c_object|
|000006c0| 2c 20 5b 66 72 65 65 5f | 6d 65 6d 6f 72 79 20 3d |, [free_|memory =|
|000006d0| 20 6c 6f 6e 67 5d 2c 0d | 09 09 73 65 74 75 70 5f | long],.|..setup_|
|000006e0| 66 72 65 65 5f 6d 65 6d | 6f 72 79 5f 62 6f 78 2f |free_mem|ory_box/|
|000006f0| 31 2c 20 74 72 75 65 29 | 2e 0d 20 0d 2f 2a 0d 20 |1, true)|.. ./*. |
|00000700| 2a 20 57 65 20 63 72 65 | 61 74 65 20 73 69 6d 70 |* We cre|ate simp|
|00000710| 6c 65 20 62 61 73 69 63 | 20 77 69 6e 64 6f 77 20 |le basic| window |
|00000720| 74 79 70 65 20 77 68 69 | 63 68 20 63 61 6e 6e 6f |type whi|ch canno|
|00000730| 74 20 62 65 20 72 65 73 | 69 7a 65 64 2e 0d 20 2a |t be res|ized.. *|
|00000740| 09 42 75 74 20 64 6f 65 | 73 20 68 61 76 65 20 61 |.But doe|s have a|
|00000750| 20 63 6c 6f 73 65 20 62 | 6f 78 2e 0d 20 2a 2f 0d | close b|ox.. */.|
|00000760| 0d 3a 2d 20 63 72 65 61 | 74 65 28 77 69 6e 64 6f |.:- crea|te(windo|
|00000770| 77 5f 74 79 70 65 2c 20 | 5f 2c 20 66 72 65 65 5f |w_type, |_, free_|
|00000780| 6d 65 6d 6f 72 79 5f 77 | 69 6e 64 6f 77 2c 0d 09 |memory_w|indow,..|
|00000790| 09 62 61 73 69 63 5f 77 | 69 6e 64 6f 77 2c 20 5b |.basic_w|indow, [|
|000007a0| 64 69 73 70 6c 61 79 5f | 62 6f 78 20 3d 20 70 74 |display_|box = pt|
|000007b0| 72 28 66 72 65 65 5f 6d | 65 6d 6f 72 79 5f 62 6f |r(free_m|emory_bo|
|000007c0| 78 29 5d 2c 20 0d 09 09 | 63 72 65 61 74 65 5f 66 |x)], ...|create_f|
|000007d0| 72 65 65 5f 6d 65 6d 5f | 64 69 73 70 6c 61 79 2f |ree_mem_|display/|
|000007e0| 32 2c 20 74 72 75 65 2c | 20 2d 31 2c 20 74 72 75 |2, true,| -1, tru|
|000007f0| 65 2c 20 74 72 75 65 2c | 20 66 61 6c 73 65 29 2e |e, true,| false).|
|00000800| 0d 0d 2f 2a 0d 20 2a 20 | 49 6e 69 74 69 61 6c 69 |../*. * |Initiali|
|00000810| 7a 65 20 61 20 6e 65 77 | 20 66 72 65 65 20 6d 65 |ze a new| free me|
|00000820| 6d 6f 72 79 20 77 69 6e | 64 6f 77 2c 20 63 72 65 |mory win|dow, cre|
|00000830| 61 74 65 20 74 68 65 20 | 64 69 73 70 6c 61 79 20 |ate the |display |
|00000840| 75 73 65 64 20 69 6e 73 | 69 64 65 0d 20 2a 09 69 |used ins|ide. *.i|
|00000850| 74 2e 0d 20 2a 2f 0d 63 | 72 65 61 74 65 5f 66 72 |t.. */.c|reate_fr|
|00000860| 65 65 5f 6d 65 6d 5f 64 | 69 73 70 6c 61 79 28 46 |ee_mem_d|isplay(F|
|00000870| 72 65 65 4d 65 6d 6f 72 | 79 57 69 6e 64 6f 77 2c |reeMemor|yWindow,|
|00000880| 20 4c 6f 63 29 20 3a 2d | 0d 09 72 65 63 74 28 54 | Loc) :-|..rect(T|
|00000890| 6f 70 2c 20 4c 65 66 74 | 2c 20 5f 2c 20 5f 2c 20 |op, Left|, _, _, |
|000008a0| 4c 6f 63 29 2c 0d 09 63 | 72 65 61 74 65 28 66 72 |Loc),..c|reate(fr|
|000008b0| 65 65 5f 6d 65 6d 6f 72 | 79 5f 62 6f 78 2c 20 46 |ee_memor|y_box, F|
|000008c0| 72 65 65 4d 65 6d 6f 72 | 79 42 6f 78 2c 20 4c 6f |reeMemor|yBox, Lo|
|000008d0| 63 20 2d 20 5b 54 6f 70 | 2c 20 4c 65 66 74 5d 2c |c - [Top|, Left],|
|000008e0| 20 0d 09 09 09 46 72 65 | 65 4d 65 6d 6f 72 79 57 | ....Fre|eMemoryW|
|000008f0| 69 6e 64 6f 77 29 2c 0d | 09 46 72 65 65 4d 65 6d |indow),.|.FreeMem|
|00000900| 6f 72 79 57 69 6e 64 6f | 77 20 5e 2e 20 64 69 73 |oryWindo|w ^. dis|
|00000910| 70 6c 61 79 5f 62 6f 78 | 20 69 73 20 46 72 65 65 |play_box| is Free|
|00000920| 4d 65 6d 6f 72 79 42 6f | 78 2c 0d 09 75 70 64 61 |MemoryBo|x,..upda|
|00000930| 74 65 5f 66 72 65 65 5f | 6d 65 6d 5f 64 69 73 70 |te_free_|mem_disp|
|00000940| 6c 61 79 28 46 72 65 65 | 4d 65 6d 6f 72 79 57 69 |lay(Free|MemoryWi|
|00000950| 6e 64 6f 77 29 2e 0d 09 | 0d 2f 2a 0d 20 2a 20 43 |ndow)...|./*. * C|
|00000960| 72 65 61 74 65 20 74 68 | 65 20 64 69 73 70 6c 61 |reate th|e displa|
|00000970| 79 20 66 6f 72 20 73 68 | 6f 77 69 6e 67 20 74 68 |y for sh|owing th|
|00000980| 65 20 61 6d 6f 75 6e 74 | 20 6f 66 20 66 72 65 65 |e amount| of free|
|00000990| 20 6d 65 6d 6f 72 79 2e | 0d 20 2a 09 4d 61 64 65 | memory.|. *.Made|
|000009a0| 20 62 79 20 74 68 65 20 | 69 6e 69 74 69 61 6c 69 | by the |initiali|
|000009b0| 7a 61 74 69 6f 6e 20 66 | 75 6e 63 74 69 6f 6e 20 |zation f|unction |
|000009c0| 61 62 6f 76 65 2e 0d 20 | 2a 2f 09 0d 73 65 74 75 |above.. |*/..setu|
|000009d0| 70 5f 66 72 65 65 5f 6d | 65 6d 6f 72 79 5f 62 6f |p_free_m|emory_bo|
|000009e0| 78 28 46 72 65 65 4d 65 | 6d 6f 72 79 42 6f 78 29 |x(FreeMe|moryBox)|
|000009f0| 20 3a 2d 0d 09 73 65 74 | 5f 66 6f 6e 74 28 46 72 | :-..set|_font(Fr|
|00000a00| 65 65 4d 65 6d 6f 72 79 | 42 6f 78 2c 20 73 79 73 |eeMemory|Box, sys|
|00000a10| 74 65 6d 2c 20 31 32 29 | 2c 0d 09 75 70 64 61 74 |tem, 12)|,..updat|
|00000a20| 65 5f 66 72 65 65 5f 6d | 65 6d 6f 72 79 5f 62 6f |e_free_m|emory_bo|
|00000a30| 78 28 46 72 65 65 4d 65 | 6d 6f 72 79 42 6f 78 29 |x(FreeMe|moryBox)|
|00000a40| 2e 0d 09 0d 75 70 64 61 | 74 65 5f 66 72 65 65 5f |....upda|te_free_|
|00000a50| 6d 65 6d 6f 72 79 5f 62 | 6f 78 28 46 72 65 65 4d |memory_b|ox(FreeM|
|00000a60| 65 6d 6f 72 79 42 6f 78 | 29 20 3a 2d 0d 09 46 72 |emoryBox|) :-..Fr|
|00000a70| 65 65 4d 65 6d 6f 72 79 | 42 6f 78 5e 2e 66 72 65 |eeMemory|Box^.fre|
|00000a80| 65 5f 6d 65 6d 6f 72 79 | 20 69 73 20 6d 61 6b 65 |e_memory| is make|
|00000a90| 5f 66 72 65 65 5f 6d 65 | 6d 6f 72 79 2c 0d 09 6e |_free_me|mory,..n|
|00000aa0| 65 65 64 73 5f 72 65 64 | 72 61 77 69 6e 67 28 46 |eeds_red|rawing(F|
|00000ab0| 72 65 65 4d 65 6d 6f 72 | 79 42 6f 78 2c 20 5b 2d |reeMemor|yBox, [-|
|00000ac0| 33 32 37 36 38 2c 20 2d | 33 32 37 36 38 2c 20 33 |32768, -|32768, 3|
|00000ad0| 32 37 36 37 2c 20 33 32 | 37 36 37 5d 29 2c 0d 09 |2767, 32|767]),..|
|00000ae0| 6c 6f 63 61 6c 5f 63 61 | 6c 6c 28 46 72 65 65 4d |local_ca|ll(FreeM|
|00000af0| 65 6d 6f 72 79 42 6f 78 | 2c 20 28 0d 09 09 09 65 |emoryBox|, (....e|
|00000b00| 72 61 73 65 28 5b 2d 33 | 32 37 36 38 2c 20 2d 33 |rase([-3|2768, -3|
|00000b10| 32 37 36 38 2c 20 33 32 | 37 36 37 2c 20 33 32 37 |2768, 32|767, 327|
|00000b20| 36 37 5d 29 2c 0d 09 09 | 09 75 70 64 61 74 65 28 |67]),...|.update(|
|00000b30| 46 72 65 65 4d 65 6d 6f | 72 79 42 6f 78 29 29 29 |FreeMemo|ryBox)))|
|00000b40| 2e 0d 09 0d 2f 2a 0d 20 | 2a 20 52 65 64 72 61 77 |..../*. |* Redraw|
|00000b50| 20 74 68 65 20 64 69 73 | 70 6c 61 79 20 6f 66 20 | the dis|play of |
|00000b60| 74 68 65 20 61 6d 6f 75 | 6e 74 20 6f 66 20 66 72 |the amou|nt of fr|
|00000b70| 65 65 20 6d 65 6d 6f 72 | 79 2e 0d 20 2a 2f 0d 66 |ee memor|y.. */.f|
|00000b80| 72 65 65 5f 6d 65 6d 6f | 72 79 5f 62 6f 78 20 3c |ree_memo|ry_box <|
|00000b90| 2d 20 75 70 64 61 74 65 | 28 46 72 65 65 4d 65 6d |- update|(FreeMem|
|00000ba0| 6f 72 79 42 6f 78 29 20 | 3a 2d 0d 09 46 72 65 65 |oryBox) |:-..Free|
|00000bb0| 4d 65 6d 20 69 73 20 46 | 72 65 65 4d 65 6d 6f 72 |Mem is F|reeMemor|
|00000bc0| 79 42 6f 78 20 5e 2e 20 | 66 72 65 65 5f 6d 65 6d |yBox ^. |free_mem|
|00000bd0| 6f 72 79 2c 0d 09 25 20 | 43 72 65 61 74 65 20 61 |ory,..% |Create a|
|00000be0| 6e 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 20 74 |n empty |string t|
|00000bf0| 6f 20 77 72 69 74 65 20 | 74 6f 2e 0d 09 63 72 65 |o write |to...cre|
|00000c00| 61 74 65 28 73 74 72 69 | 6e 67 2c 20 53 74 72 69 |ate(stri|ng, Stri|
|00000c10| 6e 67 29 2c 0d 09 63 72 | 65 61 74 65 28 69 6f 5f |ng),..cr|eate(io_|
|00000c20| 73 74 72 65 61 6d 2c 20 | 53 74 72 69 6e 67 53 74 |stream, |StringSt|
|00000c30| 72 65 61 6d 2c 20 53 74 | 72 69 6e 67 2c 20 77 72 |ream, St|ring, wr|
|00000c40| 69 74 65 29 2c 0d 09 66 | 6f 72 6d 61 74 28 53 74 |ite),..f|ormat(St|
|00000c50| 72 69 6e 67 53 74 72 65 | 61 6d 2c 20 27 25 37 64 |ringStre|am, '%7d|
|00000c60| 20 42 79 74 65 73 20 41 | 76 61 69 6c 61 62 6c 65 | Bytes A|vailable|
|00000c70| 2e 27 2c 20 5b 46 72 65 | 65 4d 65 6d 5d 29 2c 0d |.', [Fre|eMem]),.|
|00000c80| 09 64 65 73 74 72 6f 79 | 28 53 74 72 69 6e 67 53 |.destroy|(StringS|
|00000c90| 74 72 65 61 6d 29 2c 0d | 09 6d 6f 76 65 5f 74 6f |tream),.|.move_to|
|00000ca0| 28 32 30 2c 20 31 30 29 | 2c 0d 09 77 72 69 74 65 |(20, 10)|,..write|
|00000cb0| 5f 74 65 78 74 28 53 74 | 72 69 6e 67 29 2c 0d 09 |_text(St|ring),..|
|00000cc0| 64 65 73 74 72 6f 79 28 | 53 74 72 69 6e 67 29 2e |destroy(|String).|
|00000cd0| 0d 09 0d 2f 2a 0d 20 2a | 20 52 65 63 6c 61 69 6d |.../*. *| Reclaim|
|00000ce0| 20 61 6c 6c 20 73 70 61 | 63 65 20 61 6e 64 20 75 | all spa|ce and u|
|00000cf0| 70 64 61 74 65 20 74 68 | 65 20 61 6d 6f 75 6e 74 |pdate th|e amount|
|00000d00| 20 6f 66 20 66 72 65 65 | 20 6d 65 6d 6f 72 79 20 | of free| memory |
|00000d10| 69 6e 20 74 68 65 0d 20 | 2a 09 77 69 6e 64 6f 77 |in the. |*.window|
|00000d20| 2e 0d 20 2a 2f 0d 75 70 | 64 61 74 65 5f 66 72 65 |.. */.up|date_fre|
|00000d30| 65 5f 6d 65 6d 5f 64 69 | 73 70 6c 61 79 28 46 72 |e_mem_di|splay(Fr|
|00000d40| 65 65 4d 65 6d 6f 72 79 | 57 69 6e 64 6f 77 29 20 |eeMemory|Window) |
|00000d50| 3a 2d 0d 09 25 20 4f 6e | 6c 79 20 63 6f 6e 74 69 |:-..% On|ly conti|
|00000d60| 6e 75 65 20 69 66 20 74 | 68 65 20 64 69 73 70 6c |nue if t|he displ|
|00000d70| 61 79 20 68 61 73 20 6e | 6f 74 20 62 65 65 6e 20 |ay has n|ot been |
|00000d80| 64 65 73 74 72 6f 79 65 | 64 20 28 63 6c 6f 73 65 |destroye|d (close|
|00000d90| 64 29 2e 0d 09 25 0d 09 | 25 20 49 66 20 77 65 20 |d)...%..|% If we |
|00000da0| 64 6f 6e 27 74 20 63 68 | 65 63 6b 2c 20 74 68 65 |don't ch|eck, the|
|00000db0| 20 73 79 73 74 65 6d 20 | 63 61 6e 20 62 6f 6d 62 | system |can bomb|
|00000dc0| 20 62 61 64 6c 79 20 77 | 68 65 6e 20 77 65 20 77 | badly w|hen we w|
|00000dd0| 72 69 74 65 0d 09 25 20 | 74 6f 20 61 20 77 69 6e |rite..% |to a win|
|00000de0| 64 6f 77 20 77 68 69 63 | 68 20 68 61 73 20 61 6c |dow whic|h has al|
|00000df0| 72 65 61 64 79 20 62 65 | 65 6e 20 64 65 73 74 72 |ready be|en destr|
|00000e00| 6f 79 65 64 2e 0d 09 25 | 0d 09 6e 6f 74 28 64 65 |oyed...%|..not(de|
|00000e10| 73 74 72 6f 79 65 64 28 | 46 72 65 65 4d 65 6d 6f |stroyed(|FreeMemo|
|00000e20| 72 79 57 69 6e 64 6f 77 | 29 29 2c 0d 09 44 69 73 |ryWindow|)),..Dis|
|00000e30| 70 6c 61 79 20 69 73 20 | 46 72 65 65 4d 65 6d 6f |play is |FreeMemo|
|00000e40| 72 79 57 69 6e 64 6f 77 | 20 5e 2e 20 64 69 73 70 |ryWindow| ^. disp|
|00000e50| 6c 61 79 5f 62 6f 78 2c | 0d 09 75 70 64 61 74 65 |lay_box,|..update|
|00000e60| 5f 66 72 65 65 5f 6d 65 | 6d 6f 72 79 5f 62 6f 78 |_free_me|mory_box|
|00000e70| 28 44 69 73 70 6c 61 79 | 29 2c 20 0d 09 25 0d 09 |(Display|), ..%..|
|00000e80| 25 20 41 66 74 65 72 20 | 35 20 73 65 63 6f 6e 64 |% After |5 second|
|00000e90| 73 2c 20 72 75 6e 20 74 | 68 69 73 20 66 75 6e 63 |s, run t|his func|
|00000ea0| 74 69 6f 6e 20 61 67 61 | 69 6e 2e 0d 09 25 0d 09 |tion aga|in...%..|
|00000eb0| 61 66 74 65 72 5f 74 69 | 6d 65 5f 64 6f 28 35 2c |after_ti|me_do(5,|
|00000ec0| 20 75 70 64 61 74 65 5f | 66 72 65 65 5f 6d 65 6d | update_|free_mem|
|00000ed0| 5f 64 69 73 70 6c 61 79 | 28 46 72 65 65 4d 65 6d |_display|(FreeMem|
|00000ee0| 6f 72 79 57 69 6e 64 6f | 77 29 29 2e 0d 0d 2f 2a |oryWindo|w)).../*|
|00000ef0| 0d 20 2a 20 48 65 72 65 | 20 77 65 20 77 69 6c 6c |. * Here| we will|
|00000f00| 20 69 6e 73 74 61 6c 6c | 20 74 68 69 73 20 6d 65 | install| this me|
|00000f10| 6e 75 20 61 73 20 61 20 | 73 75 62 6d 65 6e 75 20 |nu as a |submenu |
|00000f20| 69 6e 73 69 64 65 20 74 | 68 65 20 66 6f 72 6d 61 |inside t|he forma|
|00000f30| 74 20 6d 65 6e 75 0d 20 | 2a 20 64 65 66 69 6e 65 |t menu. |* define|
|00000f40| 64 20 69 6e 20 74 68 65 | 20 73 74 61 6e 64 61 72 |d in the| standar|
|00000f50| 64 20 70 72 6f 6c 6f 67 | 20 69 6e 74 65 72 66 61 |d prolog| interfa|
|00000f60| 63 65 20 70 72 6f 76 69 | 64 65 64 2e 20 20 54 68 |ce provi|ded. Th|
|00000f70| 65 20 66 6f 72 6d 61 74 | 20 6d 65 6e 75 0d 20 2a |e format| menu. *|
|00000f80| 20 69 73 20 64 65 66 69 | 6e 65 64 20 69 6e 20 74 | is defi|ned in t|
|00000f90| 68 65 20 66 69 6c 65 20 | 27 3a 3a 65 6e 76 69 72 |he file |'::envir|
|00000fa0| 6f 6e 6d 65 6e 74 3a 66 | 6f 72 6d 61 74 20 6d 65 |onment:f|ormat me|
|00000fb0| 6e 75 2e 70 27 2e 0d 20 | 2a 2f 0d 3a 2d 20 73 68 |nu.p'.. |*/.:- sh|
|00000fc0| 6f 77 5f 66 72 65 65 5f | 6d 65 6d 6f 72 79 2c 0d |ow_free_|memory,.|
|00000fd0| 20 20 20 65 72 72 6f 72 | 28 32 2c 20 0d 27 41 20 | error|(2, .'A |
|00000fe0| 77 69 6e 64 6f 77 20 64 | 69 73 70 6c 61 79 69 6e |window d|isplayin|
|00000ff0| 67 20 74 68 65 20 61 6d | 6f 75 6e 74 20 6f 66 20 |g the am|ount of |
|00001000| 0d 6d 65 6d 6f 72 79 20 | 63 75 72 72 65 6e 74 6c |.memory |currentl|
|00001010| 79 20 66 72 65 65 20 28 | 6f 72 20 61 76 61 69 6c |y free (|or avail|
|00001020| 61 62 6c 65 29 0d 68 61 | 73 20 62 65 65 6e 20 73 |able).ha|s been s|
|00001030| 75 63 63 65 73 73 66 75 | 6c 6c 79 20 63 72 65 61 |uccessfu|lly crea|
|00001040| 74 65 64 2e 27 2c 20 5f | 2c 20 5f 2c 20 5f 2c 20 |ted.', _|, _, _, |
|00001050| 5f 2c 20 5f 2c 20 5f 2c | 20 5f 29 2e 0d 00 00 00 |_, _, _,| _).....|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001080| 00 00 01 00 00 00 01 22 | 00 00 00 22 00 00 00 5a |......."|..."...Z|
|00001090| 01 09 48 57 61 12 2b 0d | 74 03 9f 1d 74 19 60 ee |..HWa.+.|t...t.`.|
|000010a0| 74 17 7c c9 7c 3f 02 6e | d4 a6 7c 48 6f 08 60 f2 |t.|.|?.n|..|Ho.`.|
|000010b0| 11 66 72 65 65 20 6d 65 | 6d 20 77 69 6e 64 6f 77 |.free me|m window|
|000010c0| 2e 70 02 00 00 00 54 45 | 58 54 41 49 46 43 01 00 |.p....TE|XTAIFC..|
|000010d0| 00 00 54 45 58 54 41 49 | 46 43 01 00 00 8c 00 00 |..TEXTAI|FC......|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 a5 dd 88 d2 00 00 | 0f dd 00 00 01 7c 2e 24 |........|.....|.$|
|00001100| 0f 9f c1 db 48 6f 08 cd | 6e 51 81 07 6e 20 50 81 |....Ho..|nQ..n P.|
|00001110| 48 57 2f 02 06 40 06 cd | 6e 24 df c1 30 17 73 6b |HW/..@..|n$..0.sk|
|00001120| 04 53 00 c9 46 00 1e 80 | 8c 0d 55 40 48 57 48 6f |.S..F...|..U@HWHo|
|00001130| 08 cd 04 40 2f fe a2 6e | 60 ce 74 30 10 72 0a 60 |...@/..n|`.t0.r.`|
|00001140| b0 09 48 6f 8a 08 72 00 | 70 1c 60 c4 74 10 10 09 |..Ho..r.|p.`.t...|
|00001150| 48 6f ab 08 60 14 74 08 | 10 8e 70 10 c8 74 5f 30 |Ho..`.t.|..p..t_0|
|00001160| 10 09 2f 2f 08 cd 6e 0d | 72 6a 00 6e 14 ba 30 2f |..//..n.|rj.n..0/|
|00001170| 07 c1 ef 8a 32 2f a1 06 | c3 ef 4f d0 41 48 40 42 |....2/..|..O.AH@B|
|00001180| 00 00 00 0a 00 09 06 4d | 6f 6e 61 63 6f ff 00 00 |.......M|onaco...|
|00001190| 00 08 00 2a 00 03 01 78 | 01 f2 00 00 00 04 00 18 |...*...x|........|
|000011a0| 00 04 00 00 01 00 00 00 | 01 22 00 00 00 22 00 00 |........|."..."..|
|000011b0| 00 5a 00 21 54 ac 05 e2 | 00 00 00 1c 00 5a 00 02 |.Z.!T...|.....Z..|
|000011c0| 45 46 4e 54 00 00 00 1a | 45 57 4e 44 00 00 00 26 |EFNT....|EWND...&|
|000011d0| 45 54 41 42 00 00 00 32 | 03 eb ff ff 00 00 00 00 |ETAB...2|........|
|000011e0| 00 22 00 d4 01 00 ff ff | 00 00 00 0e 00 22 00 cc |."......|....."..|
|000011f0| 03 ec ff ff 00 00 00 1a | 00 22 00 c8 00 00 00 00 |........|."......|
+--------+-------------------------+-------------------------+--------+--------+